/**
 * Created by Yang on 2014/10/8.
 */
var config = require('./config');
var Server = require('./core/Server');
var port = config.simpleSiteConfig.PORT;
var site = new Server('site-server',port);


site.loadRouters = function(){
    var app = this.app;
    app.use('/api/simple',require('./modules/simple/simpleRouter'));

}

site.init = function(){
    this.useCoreLogger();
    this.useCookieParser();
    this.useBodyParser();
    this.useMulterUpload();
    this.useCrossSetting();
    this.useSession();
    this.loadFrontend();
    //   this.useXmlParse();
}

if (require.main === module) {
    site.run();
}